<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/base.jsp" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title>欢迎使用CRM管理系统</title>
    <link rel="stylesheet" href="${basePath }/css/bootstrap.min.css" type="text/css" />
    <link rel="stylesheet" href="${basePath }/css/style.css" type="text/css" />
    <script type="text/javascript" src="${basePath }/js/jquery.min.js"></script>
    <style type="text/css">
        .navbar {
            margin-bottom:0px;
        }
        .fieldset {
			position: absolute;
			margin-left: 290px;
			margin-top: 130px;
		}
        #btn {
			margin-left: 230px;
		}
    </style>
</head>
<body>
    <div class="navbar">
        <div class="navbar-inner">
            <div class="container">
                <a href="${basePath }/message" class="brand">凯盛CRM管理系统</a>
                <div class="nav-collapse">
                    <ul class="nav">
                        <li><a href="${basePath }/message">最新动态</a></li>
						<li><a href="${basePath }/contacts/list">联系人</a></li>
						<li><a href="${basePath }/task/list">日程安排</a></li>
						<li class="active"><a href="${basePath }/deal/list">业务机会</a></li>
                    </ul>
                    <ul class="nav pull-right">
                        <li><a href="#">${user.username }</a>
                        <li class="divider-vertical"></li>
                        <li><a href="${basePath }/user/info">账号设置</a></li>
                        <li><a href="${basePath }/user/loginout">退出</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div id="content" class="container">
        <div class="span9">
            <ul class="breadcrumb" style="vertical-align:top">
                <li class="active">业务机会</li>
                <li class="pull-right"><a href="${basePath }/deal/deal-new">新建业务</a></li>
            </ul>
            <div class="well">
                <table id="table">
                <c:forEach var="deal" items="${dealList}">
                    <tr>
                        <td style="width:130px">
                        	<c:choose>
                        		<c:when test="${deal.state eq '创建' }">
                        			<span class="label label-info">追踪</span>
                        		</c:when>
                        		<c:when test="${deal.state eq '成功' }">                        		
                        			<span class="label label-success">${deal.state }</span>
                        		</c:when>
                        		<c:when test="${deal.state eq '失败' }">                        		
                        			<span class="label">${deal.state }</span>
                        		</c:when>
                        		<c:when test="${deal.state eq '追踪' }">                        		
                        			<span class="label label-info">${deal.state }</span>
                        		</c:when>                        		
                        	</c:choose>	
	                    </td>
                        <td style="width:734px">
                            <strong><a href="${basePath }/deal/deal-detail?id=${deal.id}">${deal.title }</a></strong><br/> 							
							负责人：${deal.user.username }<br>							
							内容：${deal.content }<br/>
							创建时间：${deal.createTime }<br/>
                        </td>   
                    </tr>
                </c:forEach>					
                </table>
				
            </div>
        </div>
        
        <div class="span3 well" style="padding-top:0px">
            <div class="box">
                <div class="head">抓住机会</div>
                <div style="margin-left:10px;margin-right:10px;margin-bottom:10px;">抓住了机会，就是抓住了成功。有一句谚语："通往失败的路上，处处是错失了的机会。坐待幸运从前门进来的人，往往忽略了幸运也会从后窗进来。"成功者之所以成功，是因为他敢于冲锋、主动进攻，善于抓住胜利的时机。机遇从来都不会落在守株待兔者的头上。</div>
            </div>
        </div>       
    </div>
</body>
</html>